package com.interview.ujiuye3;

/**
 * Copyright (C), 2018-2020
 * FileName: Phone
 * Author:   kongfanyu
 * Date:     2020/10/13 14:50
 */
public class Phone {

    public synchronized void sendSMS(){
        System.out.println(Thread.currentThread().getName()+"执行发送短信方法...");
        sendEmail();
    }

    public synchronized  void sendEmail(){
        System.out.println(Thread.currentThread().getName()+"执行发送电子邮件方法...");
    }
}
